﻿using System;

namespace VirtualizingTreeView.Control
{
	public class VirtualizingDataContainer
	{
		public VirtualizingDataContainer( Object boundItem, Int32 nestingLevel )
		{
			if( boundItem == null )
			{
				throw new ArgumentNullException( "boundItem" );
			}
			BoundItem = boundItem;
			NestingLevel = nestingLevel;
			IsSelected = false;
		}

		public Object BoundItem
		{
			get;
			private set;
		}

		public Int32 NestingLevel
		{
			get;
			private set;
		}

		public Boolean IsExpanded
		{
			get;
			set;
		}

		public Boolean? IsSelected
		{
			get;
			set;
		}

		public override Boolean Equals( Object obj )
		{
			return BoundItem.Equals( obj );
		}

		public override Int32 GetHashCode()
		{
			return BoundItem.GetHashCode();
		}
	}
}
